/*
 * 2006-04-18 Li Ximing, Zhang Yanbo - Create.
 */
package com.hd123.rumba.log;

import com.hd123.rumba.exception.StringTooLongException;

/**
 * 实体日志 | 实体 | 实现类
 * 
 * @author lxm
 * @author zhangyanbo
 * 
 */
public class EntityLog extends OperateLog implements IEntityLog {

  private String managerClass;
  private String managerCaption;
  private String entityUuid = "unknown uuid";
  private String entityCaption = "未知实体";
  private Integer newState;

  public String getEntityCaption() {
    return entityCaption;
  }

  public void setEntityCaption(String entityCaption) throws StringTooLongException {
    if (entityCaption != null)
      entityCaption = CEntityLog.truncate(entityCaption, CEntityLog.LENGTH_ENTITYCAPTION,
          "entityCaption", CEntityLog.CAPTION_ENTITYCAPTION);
    this.entityCaption = entityCaption;
  }

  public String getEntityUuid() {
    return entityUuid;
  }

  public void setEntityUuid(String entityUuid) throws StringTooLongException {
    if (entityUuid != null)
      entityUuid = CEntityLog.truncate(entityUuid, CEntityLog.LENGTH_ENTITYUUID, "entityUuid",
          CEntityLog.CAPTION_ENTITYUUID);
    this.entityUuid = entityUuid;
  }

  public String getManagerCaption() {
    return managerCaption;
  }

  public void setManagerCaption(String managerCaption) throws StringTooLongException {
    if (managerCaption != null)
      managerCaption = CEntityLog.truncate(managerCaption, CEntityLog.LENGTH_MANAGERCAPTION,
          "managerCaption", CEntityLog.CAPTION_MANAGERCAPTION);
    this.managerCaption = managerCaption;
  }

  public String getManagerClass() {
    return managerClass;
  }

  public void setManagerClass(String managerClass) throws StringTooLongException {
    if (managerClass != null)
      managerClass = CEntityLog.truncate(managerClass, CEntityLog.LENGTH_MANAGERCLASS,
          "managerClass", CEntityLog.CAPTION_MANAGERCLASS);
    this.managerClass = managerClass;
  }

  public Integer getNewState() {
    return newState;
  }

  public void setNewState(Integer newState) {
    this.newState = newState;
  }

}
